local xvars top_d_b dataset HS6 
reghdfe sourcing_metric_bjc   if n_bjc==1 , abs( `xvars', savefe)
local full_model_r2 = e(r2)
capture drop include
gen byte include = e(sample)
foreach x of local xvars {
    local short_list: subinstr local xvars "`x'" ""
    reghdfe sourcing_metric_bjc  if include==1, abs(`short_list')
    display "Variance contribution of `x': =`full_model_r2' - `e(r2)'"
	di (`full_model_r2' - `e(r2)')/`full_model_r2'
	gen b_1_`x'=(`full_model_r2' - `e(r2)')/`full_model_r2'
}
local xvars b_id dataset HS6  
reghdfe sourcing_metric_bjc   if n_bjc==1 , abs( `xvars', savefe)
local full_model_r2 = e(r2)
capture drop include
gen byte include = e(sample)
foreach x of local xvars {
    local short_list: subinstr local xvars "`x'" ""
    reghdfe sourcing_metric_bjc  if include==1, abs(`short_list')
    display "Variance contribution of `x': =`full_model_r2' - `e(r2)'"
	di (`full_model_r2' - `e(r2)')/`full_model_r2'
	gen b_2_`x'=(`full_model_r2' - `e(r2)')/`full_model_r2'
}
local xvars b_id  gr_jc 
reghdfe sourcing_metric_bjc   if n_bjc==1 , abs( `xvars', savefe)
local full_model_r2 = e(r2)
capture drop include
gen byte include = e(sample)
foreach x of local xvars {
    local short_list: subinstr local xvars "`x'" ""
    reghdfe sourcing_metric_bjc  if include==1, abs(`short_list')
    display "Variance contribution of `x': =`full_model_r2' - `e(r2)'"
	di (`full_model_r2' - `e(r2)')/`full_model_r2'
	gen b_3_`x'=(`full_model_r2' - `e(r2)')/`full_model_r2'
}
local xvars b_id  gr_jc 
reghdfe sourcing_metric_bjc   if n_bjc==1 & num_c_b>=2 , abs( `xvars', savefe)
local full_model_r2 = e(r2)
capture drop include
gen byte include = e(sample)
foreach x of local xvars {
    local short_list: subinstr local xvars "`x'" ""
    reghdfe sourcing_metric_bjc  if include==1, abs(`short_list')
    display "Variance contribution of `x': =`full_model_r2' - `e(r2)'"
	di (`full_model_r2' - `e(r2)')/`full_model_r2'
	gen b_4_`x'=(`full_model_r2' - `e(r2)')/`full_model_r2'
}
local xvars b_id  gr_jc gr_dj 
reghdfe sourcing_metric_bjc   if n_bjc==1 & num_c_b>=2 , abs( `xvars', savefe)
local full_model_r2 = e(r2)
capture drop include
gen byte include = e(sample)
foreach x of local xvars {
    local short_list: subinstr local xvars "`x'" ""
    reghdfe sourcing_metric_bjc  if include==1, abs(`short_list')
    display "Variance contribution of `x': =`full_model_r2' - `e(r2)'"
	di (`full_model_r2' - `e(r2)')/`full_model_r2'
	gen b_5_`x'=(`full_model_r2' - `e(r2)')/`full_model_r2'
}

eststo O_TC1: estpost tabstat b_1_* b_2_* b_3_* b_4_* b_5_*, statistics(mean) columns(statistics)
esttab O_TC1 using "${tables}\TableC1.tex", cells("Mean(fmt(a2))")  nomtitles label nonumbers noobs unstack replace posthead(" ") nodep collabels(none) prehead(" ") postfoot(" ")